# Maintainer: Hugo Osvaldo Barrera <hugo@whynothugo.nl>
pkgname=wayidle
pkgver=0.1.1
pkgrel=0
pkgdesc="Wait for wayland compositor idle timeouts"
url="https://git.sr.ht/~whynothugo/wayidle"
# s390x: nix/libc crate
arch="all !s390x"
license="ISC"
makedepends="cargo cargo-auditable"
source="wayidle-$pkgver.tar.gz::https://git.sr.ht/~whynothugo/wayidle/archive/v$pkgver.tar.gz"
builddir="$srcdir/$pkgname-v$pkgver"
options="net" # fetch dependencies

prepare() {
	default_prepare

	cargo fetch --target="$CTARGET" --locked
}

build() {
	cargo auditable build --release --frozen
}

check() {
	cargo test --frozen
}

package() {
	install -Dm 0755 target/release/wayidle -t "$pkgdir"/usr/bin/
}

sha512sums="
700305bff833779c5153a4e88d8316bebb0d87715af71d137eebb2b1bb49b0433aed16857bc64780884e79f7c7a899cd73a445c40c0601f1b8710bfddb290aab  wayidle-0.1.1.tar.gz
"
